package com.xiaocz.hblsubstitutedriving.activities.activity.dialog;

import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.widget.ImageView;

import com.xiaocz.hblsubstitutedriving.R;
import com.xiaocz.hblsubstitutedriving.base.NativeActivity;

import butterknife.BindView;
import butterknife.OnClick;
import cn.bingoogolapple.bgabanner.BGABanner;
import cn.bingoogolapple.bgabanner.BGALocalImageSize;

/**
 * Time:2019/11/7
 * Created by xiaocz
 * Describe 小程序-轮播广告
 */
public class AdvertisingActivity extends NativeActivity {

    @BindView(R.id.banner_guide_content)
    BGABanner mContentBanner;

    @Override
    protected int getLayoutSourceId() {
        return R.layout.dialog_banner;
    }

    public static void show(Context context) {
        Intent intent = new Intent(context, AdvertisingActivity.class);
        context.startActivity(intent);
    }

    @OnClick({R.id.cancel_btn})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.cancel_btn:
                finish();
                break;
        }
    }

    @Override
    protected void initData() {
        BGALocalImageSize localImageSize = new BGALocalImageSize(720, 1280, 320, 640);
        mContentBanner.setData(localImageSize, ImageView.ScaleType.CENTER_CROP,
                R.drawable.wx_xcx,
                R.drawable.wx_xcx,
                R.drawable.wx_xcx);
    }
}
